<#macro Accordion id>
<div class="accordion" id="${id}">
    <#nested>
</div>
</#macro>

<#macro Item id title parentId expanted=false>
    <div class="card">
        <div class="card-header" id="heading${id}">
            <h2 class="mb-0">
                <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapse${id}" aria-expanded="${expanted}" aria-controls="collapse${id}">
                    ${title}
                </button>
            </h2>
        </div>

        <div id="collapse${id}" class="collapse <#if expanted==true>show</#if>" aria-labelledby="heading${id}" data-parent="#${parentId}">
            <div class="card-body">
                <#nested>
            </div>
        </div>
    </div>
</#macro>